<% @weather = Weather.get_weather(subscription.city) %>
	
	<% if not subscription.collapsed %>	
	
		<%= link_to({:controller=> 'subscriptions' , :action => 'update_collapse', :id => subscription.id , :value => 1 }, {:class => "subs_content", :remote => true})  do %>
			
			 <table class="now subs_bg_gradient gradient round shadow"> 
			 	<tr>
					<td class="city_name" rowspan="2"><%= subscription.city %></td>
					<td rowspan='2'><img src='<%= @weather['forecast']['now']['icon'] %> '/></td> 
					<td><strong><%= @weather['forecast']['now']['temperature'] %> &deg;C</strong></td> 
					<td><%= link_to image_tag("delete.png") , subscription, confirm: 'Etes-vous sûr ?', class: 'destroy', method: :delete, remote: true %></td>
				</tr> 
				 <tr> 
					 <td><%= @weather['forecast']['today']['high_temperature'] %> &deg;C</td> 
					 <td class="temp_low"><%= @weather['forecast']['today']['low_temperature'] %> &deg;C</td> 
				 </tr> 
			 </table> 
			<%= render :partial => 'weathers/forecast' %> 

		<% end %>
		
	<% else %>
		
		<%= link_to({:controller=> 'subscriptions' , :action => 'update_collapse', :id => subscription.id , :value => 0 }, {:class => "subs_content", :remote => true})  do %>
			
			 <table class="now subs_bg_gradient gradient round shadow"> 
			 	<tr>
					<td class="city_name" rowspan="2"><%= subscription.city %></td>
					<td rowspan='2'><img src='<%= @weather['forecast']['now']['icon'] %> '/></td> 
					<td><strong><%= @weather['forecast']['now']['temperature'] %> &deg;C</strong></td> 
					<td><%= link_to image_tag("delete.png") , subscription, confirm: 'Etes-vous sûr ?', class: 'destroy', method: :delete, remote: true %></td>
				</tr> 
				 <tr> 
					 <td><%= @weather['forecast']['today']['high_temperature'] %> &deg;C</td> 
					 <td class="temp_low"><%= @weather['forecast']['today']['low_temperature'] %> &deg;C</td> 
				 </tr> 
			 </table> 
			 
		<% end %>
		
	<% end %>
	